using UnityEngine;
using UnityEngine.UI;

public class iapShow : MonoBehaviour
{
	public GameObject IAP_Obj;

	public GameObject SaleOff_Obj;

	public Animator iapAnimator;

	public Animator SaleOffAnimator;

	public Animator SaleOffBtnAnimator;

	public Text TextCoins;

	public Text TextCoins1;

	public Text iap1Text;

	public Text iap2Text;

	public Text iap3Text;

	public Text iap4Text;

	public Text iap5Text;

	public Text iap6Text;

	public Text iap7Text;

	public Text iapSpecialText;

	public GameObject SaleObj1;

	private void Start()
	{
		if (DataManager.Instance.Maps <= 5)
		{
			SaleOffBtn_Show();
		}
		else if (DataManager.Instance.Maps > 6 || DataManager.Instance.Maps <= 9)
		{
			SaleOffBtn_Show();
		}
		else if (DataManager.Instance.Maps > 11)
		{
			SaleOffBtn_Show();
		}
		else
		{
			SaleOffBtn_Hide();
		}
	}

	private void Update()
	{
		TextCoins.text = string.Concat(CoinManager.coin);
		TextCoins1.text = string.Concat(CoinManager.coin);
	}

	public void IAP_Show()
	{
		IAP_Obj.SetActive(value: true);
		iapAnimator.SetBool("Off", value: false);
		iapAnimator.SetTrigger("On");
		//FirebaseStat.Instance.LogSimpleEvent("ns_enter_shop");
	}

	public void IAP_Hide()
	{
		iapAnimator.SetBool("On", value: false);
		iapAnimator.SetTrigger("Off");
	}

	private void ResetAnimationParameters()
	{
		if (!(iapAnimator == null))
		{
			iapAnimator.SetBool("On", value: false);
			iapAnimator.SetBool("Off", value: false);
		}
	}

	public void SaleOff_Show()
	{
		SaleOff_Obj.SetActive(value: true);
		SaleOffAnimator.SetBool("Off", value: false);
		SaleOffAnimator.SetTrigger("On");
		//FirebaseStat.Instance.LogSimpleEvent("ns_special_offer");
	}

	public void SaleOff_Hide()
	{
		SaleOffAnimator.SetBool("On", value: false);
		SaleOffAnimator.SetTrigger("Off");
	}

	private void ResetSaleOffParameters()
	{
		if (!(SaleOffAnimator == null))
		{
			SaleOffAnimator.SetBool("On", value: false);
			SaleOffAnimator.SetBool("Off", value: false);
		}
	}

	public void SaleOffBtn_Show()
	{
		SaleOffBtnAnimator.SetBool("Off", value: false);
		SaleOffBtnAnimator.SetTrigger("On");
	}

	public void SaleOffBtn_Hide()
	{
		SaleOffBtnAnimator.SetBool("On", value: false);
		SaleOffBtnAnimator.SetTrigger("Off");
	}

	private void ResetSaleOffBtnParameters()
	{
		if (!(SaleOffBtnAnimator == null))
		{
			SaleOffBtnAnimator.SetBool("On", value: false);
			SaleOffBtnAnimator.SetBool("Off", value: false);
		}
	}

	public void UpdatePrice(string iap1, string iap2, string iap3, string iap4, string iap5, string iap6, string iap7, string special)
	{
		iap1Text.text = iap1;
		iap2Text.text = iap2;
		iap3Text.text = iap3;
		iap4Text.text = iap4;
		iap5Text.text = iap5;
		iap6Text.text = iap6;
		iap7Text.text = iap7;
		iapSpecialText.text = "JUST " + special;
	}
}
